/*
 * @Description:
 * @Version: 1.0
 * @Autor: haozhuang
 * @Date: 2020-05-07 15:56:52
 * @LastEditors: haozhuang
 * @LastEditTime: 2020-05-11 17:08:08
 */
import request from '../utils/request'
const projectid = sessionStorage.projectId
export function recycleGetAll() {
  return request({
    url: '/recycle/getAll',
    method: 'get',
    params: { projectid }
  })
}

export function recycleClean() {
  return request({
    url: '/recycle/clean',
    method: 'get',
    params: { projectid }
  })
}

export function folderRecovery(parentId, name, id, level) {
  return request({
    url: '/folder/recovery',
    method: 'post',
    data: { parentId, name, id, level }
  })
}

export function folderDelete(id) {
  return request({
    url: '/folder/delete/' + id,
    method: 'get'
  })
}

export function fileRecovery(folderId, name, id) {
  return request({
    url: '/file/recovery',
    method: 'post',
    data: { folderid: folderId, name, id }
  })
}

export function fileDelete(id) {
  return request({
    url: '/file/delete/' + id,
    method: 'get'
  })
}

export function recycleGetMyAll() {
    return request({
        url: '/recycle/getMy',
        method: 'get',
        params: { projectid }
    })
}

export function recycleCleanMy() {
    return request({
        url: '/recycle/cleanMy',
        method: 'get',
        params: { projectid }
    })
}